<template>
  <div class="title-box">
    <span class="title-text">
      <i slot="icon" v-if="required" style="color: #d14a49">*</i>
      <slot name="icon" />
      {{ title }}
    </span>
  </div>
</template>

<script>
export default {
  name: 'Title',
  props: {
    required: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss" scoped>
.title-box {
  padding: 0 0 10px 0;
  margin-bottom: 15px;
  color: #555;
  border-bottom: 1px solid #f6f6f6;
}
</style>
